
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
  int a[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  int b[10];
  for (int i = 0; i < 10; i++) {
    cout << "a[" << i << "]"
         << " = " << a[i] << endl;
    b[i] = a[i];
    cout << "b[" << i << "]"
         << " = " << b[i] << endl;
  }

  vector<int> v1(
      a,
      a + 10); // vector的赋值并不可以像数组一样方便的用花括号方便的赋值，这里借用了数组来初始化这个vector
  vector<int> v2 = v1;
  int c[10];
  for (int i = 0; i < 10; i++) {
    cout << "a[" << i << "]"
         << " = " << a[i] << endl;
    c[i] = a[i];
    cout << "c[" << i << "]"
         << " = " << b[i] << endl;
    cout << "v1[" << i << "]"
         << " = " << v1[i] << endl;
    cout << "v2[" << i << "]"
         << " = " << v2[i] << endl;
    return 0;
  }
}